
/** 表格表头 */
export const tableColumns = (t: (msg:string)=>string) => ([
  {
    prop: 'id',
    type: 'selection',
    label: t('table.selection'),
    width: 55,
    reserveSelection: true
  },
  {
    prop: 'id',
    label: t('table.id'),
    width: 130,
  },
  {
    prop: 'sort',
    label: t('table.sort'),
    minWidth: 60,
  },
  {
    prop: 'title',
    label: t('table.title'),
    minWidth: 180,
  },
  {
    prop: 'statistics',
    label: t('table.statistics'),
    minWidth: 140,
  },
  {
    prop: 'status',
    label: t('table.status'),
    minWidth: 70,
  },
  {
    prop: 'action',
    label:  t('table.operation'),
    width: 280,
    showOverflowTooltip: false,
    fixed: 'right',
  },
]);

/** 表格搜索表单 */
export const tableSearchFormItems = (t: (msg:string)=>string) => ([
  {
    attrs: {
      label: t('search.title'),
      prop: 'title',
    },
    value: '',
    component: {
      is: 'el-input',
      props: {
        placeholder: t('search.title.placeholder'),
      },
    },
  },
]);
